package com.example.zwh.computershop.my_shopp;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;

import com.example.zwh.computershop.R;
import com.example.zwh.computershop.androidUtil.ActivityCollector;

public class AddModifyAddressActivity extends AppCompatActivity implements View.OnClickListener{

    ImageView add_address_back, moidfy_adress_back;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.add_modify_address);
        ActivityCollector.addActivity(this);
        init();
        clidkView();
    }

    void init() {
        add_address_back = findViewById(R.id.back_from_add_address);
        moidfy_adress_back = findViewById(R.id.back_from_modify_address);
    }

    void clidkView() {
        add_address_back.setOnClickListener(this);
        moidfy_adress_back.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.back_from_add_address :
                finish();
                break;
            case R.id.back_from_modify_address :
                finish();
                break;
        }
    }
}
